﻿using System;
using Microsoft.Xna.Framework;

namespace Terraria.World.Generation
{
	// Token: 0x02000094 RID: 148
	public abstract class GenShape : GenBase
	{
		// Token: 0x06000A3A RID: 2618
		public abstract bool Perform(Point origin, GenAction action);

		// Token: 0x06000A3B RID: 2619 RVA: 0x0000B065 File Offset: 0x00009265
		protected bool UnitApply(GenAction action, Point origin, int x, int y, params object[] args)
		{
			if (this._outputData != null)
			{
				this._outputData.Add(x - origin.X, y - origin.Y);
			}
			return action.Apply(origin, x, y, args);
		}

		// Token: 0x06000A3C RID: 2620 RVA: 0x0000B097 File Offset: 0x00009297
		public GenShape Output(ShapeData outputData)
		{
			this._outputData = outputData;
			return this;
		}

		// Token: 0x06000A3D RID: 2621 RVA: 0x0000B0A1 File Offset: 0x000092A1
		public GenShape QuitOnFail(bool value = true)
		{
			this._quitOnFail = value;
			return this;
		}

		// Token: 0x04000EBA RID: 3770
		private ShapeData _outputData;

		// Token: 0x04000EBB RID: 3771
		protected bool _quitOnFail;
	}
}
